<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<script type="text/javascript">
function Person(name,age){
	this.name = name;
	this.age=age;
	this.name = "tianlong";
	this.alertName = function(){
	console.log(this.name);
	}
	
	this.alertAge = function(){
		console.log(this.age);
	}
}

function webDever(name,age,sex){
	Person.call(this,name,age);
	this.sex=sex;
	this.color = 'black';
	this.alertSex = function(){
		console.log(this.sex);
	}
}
	var test= new webDever("设计蜂巢",24,"男");
	test.alertName();//设计蜂巢
	test.alertAge();//24
	test.alertSex();//男
	
	
color = "red";
	function sayColor(sPrefix,sSuffix) {
// 		this.color = "red1";
		console.log(sPrefix + this.color + sSuffix);
	};

	var obj = new Object();
	obj.color = "blue";

	sayColor( "The color is ", " a very nice color indeed.");
	sayColor.call(test, "The color is ", " a very nice color indeed.");
	sayColor.call(obj, "The color is ", " a very nice color indeed.");
// 	obj.sayColor("The color is ", " a very nice color indeed.");
	console.log(sayColor.color);

</script>
<body>

</body>
</html>